package com.redoor.app.stake.basicdata.hsf.service.impl;

import com.alibaba.boot.hsf.annotation.HSFProvider;
import com.redoor.app.stake.basicdata.service.BaseVendorInfoService;
import com.yotouch.app.stake.Consts;
import com.yotouch.app.stake.hsf.qz.QzVendorService;
import com.yotouch.app.stake.model.Vendor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * HSF厂商信息实现
 * Created by zhangYiHang on 2018/3/27.
 */
@HSFProvider(serviceInterface = QzVendorService.class, serviceVersion = "5.0.0", serviceGroup = "grp_asset_of_stake", clientTimeout = 600000)
@Service
public class QzVendorServiceImpl implements QzVendorService {

    private static final Logger logger = LoggerFactory.getLogger(QzVendorServiceImpl.class) ;
    @Autowired
    private BaseVendorInfoService baseVendorInfoService;

    @Override
    public List<Vendor> queryVendor() {
        logger.info("前置查询厂家列表开始");

        List<Vendor> stakeList = null;
        try{
            stakeList = this.baseVendorInfoService.qryVendorInfoToHSF();
        }catch (Exception e){
            e.printStackTrace();
            logger.info("前置查询厂家列表发生异常"+e.getMessage());
        }

        logger.info("前置查询厂家列表结束");

        return stakeList;
    }
}
